﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace AppDataStruct
{
    [Serializable]
    public class MapPair
    {
        public string code;
        public string value;
    }

    [Serializable]
    public class QGRKInfo
    {
        public string XB;
        public string XB_CODE;
        public string SFZH;
        public string FWCS;
        public string CYM;
        public string CSDXZ;
        public string JGSSX;
        public string CSD;
        public string CSD_CODE;
        public string BYZK;
        public string BYQK_CODE;
        public string HYZK;
        public string ZZXZ;
        public string WHCD;
        public string WHCD_CODE;
        public string MZ;
        public string MZ_CODE;
        public string XM;
        public string CSRQ;
        public string SNSW;//1为本省 0为外省
        public string XPDZ;//相片文件路径
        public string HKSZD; //户口所在地
        public string HKSZD_CODE;

        public void Reset()
        {
            XB = "";
            SFZH = "";
            FWCS = "";
            CYM = "";
            CSDXZ = "";
            JGSSX = "";
            CSD = "";
            BYZK = "";
            HYZK = "";
            ZZXZ = "";
            WHCD = "";
            MZ = "";
            MZ_CODE = "";
            XM = "";
            CSRQ = "";
            SNSW = ""; 
            XPDZ = "";
            HKSZD = "";
        }
    }

    [Serializable]
    public class OfficialInfo
    {
        public string ZWXM;
        public string RSZGDW;

        public void Reset()
        {
            ZWXM = "";
            RSZGDW = "";
        }
    }

    [Serializable]
    public class PaperInfo
    {
        public string ywxm;
        public string zwxm;
        public string xb;
        public string csrq;
        public string sfzh;
        public string zjzl;
        public string zjhm;
        public string qfrq;
        public string qfjg;
        public string zjyxqz;
        public string zjzt;
    }

    [Serializable]
    public class CHPaperInfo
    {
        public string name;
        /// <summary>
        /// 同音姓名
        /// </summary>
        public string sameSpell;
        /// <summary>
        /// 拼音姓名
        /// </summary>
        public string nameSpell;
        /// <summary>
        /// 曾用名
        /// </summary>
        //public string alais;
        /// <summary>
        /// 性别代码
        /// </summary>
        public MapPair gender;
        /// <summary>
        /// 出生日期，yyyyMMdd
        /// </summary>
        public string birthday;
        /// <summary>
        /// 出生地
        /// 国外出生为3位国家/地区代码
        /// 国内出生为行政区划编码前2位
        /// </summary>
        public string homePlace;
        /// <summary>
        /// 国籍或地区代码
        /// </summary>
        public MapPair nationality;
        /// <summary>
        /// 公民身份证号码
        /// </summary>
        public string idNO;
        /// <summary>
        /// 政治面貌
        /// </summary>
        public MapPair politicalType;
        /// <summary>
        /// 文化程度，文化程度代码
        /// </summary>
        public MapPair education;
        /// <summary>
        /// 职级职称，代码
        /// </summary>
        public MapPair techLevel;
        /// <summary>
        /// 工作单位，申请人所在单位
        /// </summary>
        //public string organiztion;
        /// <summary>
        /// 民族代码
        /// </summary>
        public MapPair folk;
        /// <summary>
        /// 现住址，详细通信地址
        /// </summary>
        public string residenceAddr;
        /// <summary>
        /// 户口所在地，行政区划代码
        /// </summary>
        public MapPair regResidence;
        /// <summary>
        /// 所属派出所名称
        /// </summary>
        public string residencePSName;
        /// <summary>
        /// 所属派出所代码
        /// </summary>
        public string residencePS;
        /// <summary>
        /// 职业
        /// </summary>
        public string career;
        /// <summary>
        /// 联系电话
        /// </summary>
        public string tel;
        /// <summary>
        /// 手机号码
        /// </summary>
        public string mobilePhone;
        /// <summary>
        /// 现持证件种类,申请时持有的证件种类代码
        /// </summary>
        public MapPair paperTypeNow;
        /// <summary>
        /// 现持证件号码,申请时持有的证件号码
        /// </summary>
        public string paperNONow;
        /// <summary>
        /// 证件号码
        /// </summary>
        public string paperNO;
        /// <summary>
        /// 证件种类
        /// </summary>
        public MapPair PaperType;
        /// <summary>
        /// 办证类别代码
        /// </summary>
        public MapPair paperAcceptType;
        /// <summary>
        /// 函调编号,由函调请求方产生,6 位行政区划编号+9 位序号
        /// </summary>
        public string letterReqNO;
        /// <summary>
        /// 是否国家工作人员(0:不是,1:是)
        /// </summary>
        public MapPair official;
        /// <summary>
        /// 转印膜编号
        /// </summary>
        public string transFilmNO;
        /// <summary>
        /// 芯片编号
        /// </summary>
        public string icNO;
        /// <summary>
        /// 前往国或地区,国家/地区代码
        /// </summary>
        public MapPair target;
        /// <summary>
        /// 出境事由,出境事由代码
        /// </summary>
        public MapPair expReason;
        /// <summary>
        /// 审批机关,签发机关编码
        /// </summary>
        public MapPair approveOrg;
        /// <summary>
        /// 制证单位,行政区划代码
        /// </summary>
        public MapPair produceOrg;
        /// <summary>
        /// 签发日期,格式为yyyyMMdd
        /// </summary>
        public string signedDay;
        /// <summary>
        /// 证件有效期截止日期, 格式为yyyyMMdd
        /// </summary>
        public string expiredDay;
        /// <summary>
        /// 受理时间， 格式为yyyyMMddHHmmss
        /// </summary>
        public string acceptTime;
        /// <summary>
        /// 受理机关,行政区划代码
        /// </summary>
        public MapPair acceptOrg;
        /// <summary>
        /// 备注
        /// </summary>
        public string memo;
        /// <summary>
        /// 拼接的查询条件
        /// </summary>
        public string queryStr;

        public PaperInfo ToPaperInfo()
        {
            PaperInfo paper = new PaperInfo();
            paper.csrq = this.birthday;
            paper.qfjg = this.approveOrg.code;
            paper.qfrq = this.signedDay;
            paper.sfzh = idNO;
            paper.xb = gender.code;
            paper.ywxm = nameSpell;
            paper.zjhm = paperNO;
            paper.zjyxqz = expiredDay;
            paper.zjzl = this.PaperType.code;
            paper.zjzt = "1";
            paper.zwxm = name;
            return paper;
        }
    }
}
